#include "StdAfx.h"
#include "GroundResistor.h"


CGroundResistor::CGroundResistor(void)
{
	m_dblValue = 0;
}

CGroundResistor::CGroundResistor( const CGroundResistor* pEntityObj )
	:CGroundUnit(pEntityObj)
{
	m_dblValue = pEntityObj->GetResistorValue();
}


CGroundResistor::~CGroundResistor(void)
{
}

void CGroundResistor::Serialize( CArchive & ar )
{
	throw std::exception("The method or operation is not implemented.");
}

void CGroundResistor::Clear()
{
}

void CGroundResistor::CopyDisplayObj( long lSourceLayerId, long lDestLayerId )
{
	CEntityObj::CopyDisplayObj(lSourceLayerId,lDestLayerId);
}

void CGroundResistor::DeleteDisplayObj( long lLayerId )
{
	CEntityObj::DeleteDisplayObj(lLayerId);
}

CDisplayObj * CGroundResistor::CreateDisplayObj( long lLayerId )
{
	CGroundResistorDisObj* pResistorDis = new CGroundResistorDisObj(this);
	pResistorDis->SetLayerId(lLayerId);
	return pResistorDis;
}

CObj * CGroundResistor::Clone() const
{
	return new CGroundResistor(this);
}

void CGroundResistor::Transform( const CMatrix transf )
{
}

bool CGroundResistor::GetBox( double & dblLeft, double & dblBottom, double & dblRight, double & dblTop ) const
{
	return false;
}

eGroundUnitEntType CGroundResistor::GetGroundUnitType() const
{
	return GROUND_RESISTOR;
}

double CGroundResistor::GetResistorValue() const
{
	return m_dblValue;
}

void CGroundResistor::SetResistorValue( double val )
{
	m_dblValue = val;
}
